import { createApp } from 'vue';
import './styles/index.css';
import App from './App.vue';
import {createPinia} from "pinia";
import router from "./router";
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import "./perssion";

const app = createApp(App);

//pinia
const pinia = createPinia();
app.use(pinia);

//router
app.use(router);

//导入组件库
app.use(ElementPlus, {
    locale: zhCn,
});

//导入icon
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component as any);
}

app.mount('#app');
